def convert_to_chinese_times(hour):
    if 23 <= hour or hour < 1:
        return "子时"
    elif 1 <= hour < 3:
        return "丑时"
    elif 3 <= hour < 5:
        return "寅时"
    elif 5 <= hour < 7:
        return "卯时"
    elif 7 <= hour < 9:
        return "辰时"
    elif 9 <= hour < 11:
        return "巳时"
    elif 11 <= hour < 13:
        return "午时"
    elif 13 <= hour < 15:
        return "未时"
    elif 15 <= hour < 17:
        return "申时"
    elif 17 <= hour < 19:
        return "酉时"
    elif 19 <= hour < 21:
        return "戌时"
    else:
        return "亥时"


def convert_to_chinese_time(hour, minute):
    # 获取12时辰索引并转换为时辰名称
    chinese_hour = convert_to_chinese_times(hour)

    if hour % 2 != 0:
        minute_mark = "上"
    else:
        minute_mark = "下"

    # 获取小时的刻度
    if minute < 15:
        minute_mark = minute_mark + '一刻'
    elif minute < 30:
        minute_mark = minute_mark + '二刻'
    elif minute < 45:
        minute_mark = minute_mark + '三刻'
    else:
        minute_mark = minute_mark + '四刻'

    # 返回格式化后的字符串
    return f'{chinese_hour}{minute_mark}'


class GetShiChen:

    @staticmethod
    def get_shi_chen(hour, minute):
        # 调用函数进行转换并打印结果
        return convert_to_chinese_time(hour, minute)
